package com.own.core.html.page;

import javax.persistence.Transient;

import org.apache.wicket.Component;
import org.apache.wicket.markup.html.WebPage;
 
import com.own.core.html.modal.OwnModalWindow;
import com.own.core.main.HeaderPanel;

public abstract class OwnWebPage extends WebPage {
	@Transient
	private OwnModalWindow modalWindow;
	@Transient
	private HeaderPanel headerPanel;
	@Transient
	Component  mainComponent;

	public OwnWebPage() {
		// add header panel
		headerPanel = new HeaderPanel();
		add(headerPanel);
		
		//add modal windowns
		modalWindow = new OwnModalWindow();
		add(modalWindow);

	}

//	@Override
//	protected void configureResponse() {
//		super.configureResponse();
//		WebResponse response = getWebRequestCycle().getWebResponse();
//		response.setHeader("Cache-Control",
//				"no-cache, max-age=0,must-revalidate, no-store");
//
//		response.setHeader("Expires", "-1");
//		response.setHeader("Pragma", "no-cache");
//	}

	public OwnModalWindow getModalWindow() {
		return modalWindow;
	}
	public Component getMainComponent() {
		return  mainComponent;
	}

	public void setModalWindow(OwnModalWindow modalWindow) {
		this.modalWindow = modalWindow;
	}

	public HeaderPanel getHeaderPanel() {
		return headerPanel;
	}

	public void setHeaderPanel(HeaderPanel headerPanel) {
		this.headerPanel = headerPanel;
	}

	public void setMainComponent(Component mainComponent) {
		this.mainComponent = mainComponent;
	}

}
